﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Data.Objects;
using DataLayer.Entities;
namespace DataLayer.Configuration
{
    public class PersonConfiguration : EntityConfiguration<Person>
    {
        public PersonConfiguration()
        {
            Property(p => p.PersonID).IsIdentity();
            MapHierarchy(
                p => new
                {
                    p.PersonID,
                    p.AddressNumber,
                    p.BirthDate,
                    p.City,
                    p.Country,
                    p.EducationLevelID,
                    p.Email,
                    p.Name,
                    p.Neighbourhood,
                    p.State,
                    p.Street,
                    p.WebPage,
                    p.ZipCode
                }
                ).ToTable("Person");
        }
    }
}
